import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class setintroduction extends StatefulWidget {

  @override
  _setintroductionState createState() => _setintroductionState();
}

class _setintroductionState extends State<setintroduction>{
  @override
  Widget build(BuildContext context) {
    TextEditingController tc = TextEditingController();
    return Scaffold(
        appBar: CupertinoNavigationBar(
          backgroundColor: Colors.yellow,
          middle: const Text('设置简介'),
        ),
        body: ListView(
          children: [
            Container(
              margin : EdgeInsets.all(10),
              decoration: BoxDecoration(
                shape: BoxShape.rectangle,
                border: Border.all(width: 1, color: Colors.yellow)
              ),
              child: TextField(
                maxLines: 5,
                controller: tc,
              ),
            ),
            OutlineButton(
              child: Text('保存'),
              textColor: Colors.orange,
              color: Colors.white,
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
              borderSide: BorderSide(color: Colors.orange, width: 1),
              onPressed: () {
                Navigator.pop(context,tc.text);
              },
            ),
          ],
        )
    );
  }
}